package com.zhuojy.equity.mall.admin.web.controller.record;

import com.zhuojy.equity.mall.admin.common.entity.po.record.TRecordCaselockerPO;
import com.zhuojy.equity.mall.admin.common.pojo.ResultEntity;
import com.zhuojy.equity.mall.admin.service.record.RecordCaselockerService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author xrz
 * @version 1.0
 * @description:TODO
 * @date 2024/4/15 16:32
 */
@RestController
@RequiredArgsConstructor
@CrossOrigin
@RequestMapping("recordcaselocker")
public class RecordCaselockerController {

    @Autowired
    private RecordCaselockerService recordcaselockerService;

    /**
     * 查询信息
     *
     * @param tCarMaintainPO
     * @param pageSize
     * @param pageNum
     * @return
     */
    @RequestMapping("findrecordcaselockerPagination")
    private ResultEntity findrecordcaselockerPagination(@RequestBody TRecordCaselockerPO tCarMaintainPO, @RequestParam("pageSize") Integer pageSize, @RequestParam("pageNum") Integer pageNum) {
        return recordcaselockerService.findrecordcaselockerPagination(tCarMaintainPO, pageSize, pageNum);
    }

    /**
     * 添加信息
     *
     * @param tCarEtcConsumePO
     * @return
     */
    @RequestMapping("addrecordcaselocker")
    private ResultEntity addrecordcaselocker(@RequestBody TRecordCaselockerPO tCarEtcConsumePO) {
        return recordcaselockerService.addrecordcaselocker(tCarEtcConsumePO);
    }

    /**
     * 修改信息
     *
     * @param tCarEtcConsumePO
     * @return
     */
    @RequestMapping("uprecordcaselocker")
    private ResultEntity uprecordcaselocker(@RequestBody TRecordCaselockerPO tCarEtcConsumePO) {
        return recordcaselockerService.uprecordcaselocker(tCarEtcConsumePO);
    }

    /**
     * 回显信息
     *
     * @param id
     * @return
     */
    @RequestMapping("echorecordcaselocker")
    private ResultEntity echorecordcaselocker(@RequestParam("id") Integer id) {
        return recordcaselockerService.echorecordcaselocker(id);
    }

    /**
     * 删除信息
     *
     * @param id
     * @return
     */
    @RequestMapping("delrecordcaselocker")
    private ResultEntity delrecordcaselocker(@RequestParam("id") Integer id) {
        return recordcaselockerService.delrecordcaselocker(id);
    }

    /**
     * 查询指定信息
     * @return
     */
    @RequestMapping("findselect")
    private ResultEntity findselect(){
        return recordcaselockerService.findselect();
    }

}
